package web.Positiontype;

import com.google.gson.Gson;
import services.PositiontypeService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/addPositiontype")
public class AddPositiontype extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String positionType_name = req.getParameter("positionType_name");
        int i = new PositiontypeService().addPositiontype(positionType_name);
        resp.getWriter().println(i > 0 ? "添加成功": "添加失败");
    }
}
